<!DOCTYPE html>
<html >
<head>

    <!--[if lt IE 9]>
        <style>body {display: none; background: none !important} </style>
        <meta http-equiv="Refresh" Content="0; url=//outdatedbrowser.com/" />
    <![endif]-->

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<meta name="author" content="Mark" />



<meta name="description" content="转自《HEXO+Github,搭建属于自己的博客》">
<meta property="og:type" content="article">
<meta property="og:title" content="HEXO+Github Create your Blog">
<meta property="og:url" content="http://markma.tk/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/index.html">
<meta property="og:site_name" content="Mark's Blog">
<meta property="og:description" content="转自《HEXO+Github,搭建属于自己的博客》">
<meta property="og:image" content="https://source.unsplash.com/random">
<meta property="og:updated_time" content="2016-08-17T01:48:59.157Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="HEXO+Github Create your Blog">
<meta name="twitter:description" content="转自《HEXO+Github,搭建属于自己的博客》">
<meta name="twitter:image" content="https://source.unsplash.com/random">

<link rel="apple-touch-icon" href= "/apple-touch-icon.png">




    <link rel="shortcut icon" href="/favicon.png">



    <link href="//cdn.bootcss.com/animate.css/3.5.1/animate.min.css" rel="stylesheet">



    <link href="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet">



    <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-minimal.css" rel="stylesheet">


<link rel="stylesheet" href="/css/style.css">



<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">


<title>HEXO+Github Create your Blog | Mark&#39;s Blog</title>

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

<script>
    var yiliaConfig = {
        fancybox: true,
        animate: true,
        isHome: false,
        isPost: true,
        isArchive: false,
        isTag: false,
        isCategory: false,
        fancybox_js: "//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.js",
        scrollreveal: "//cdn.bootcss.com/scrollReveal.js/3.1.4/scrollreveal.min.js",
        search: true
    }
</script>


    <script>
        yiliaConfig.jquery_ui = [true, "//cdn.bootcss.com/jqueryui/1.10.4/jquery-ui.min.js", "//cdn.bootcss.com/jqueryui/1.10.4/css/jquery-ui.min.css"];
    </script>



    <script> yiliaConfig.rootUrl = "\/";</script>





    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?fad5c01287c961d95e4fe533d91c8aab";
            var s = document.getElementsByTagName("script")[0]; 
            s.parentNode.insertBefore(hm, s);
        })();
    </script>


</head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            <img src="/img/avatar.png" class="animated zoomIn">
        </a>
        <hgroup>
          <h1 class="header-author"><a href="/">Mark</a></h1>
        </hgroup>

        
        <p class="header-subtitle">To do to make progress</p>
        

        
            <form id="search-form">
            <input type="text" id="local-search-input" name="q" placeholder="search..." class="search form-control" autocomplete="off" autocorrect="off" searchonload="false" />
            <i class="fa fa-times" onclick="resetSearch()"></i>
            </form>
            <div id="local-search-result"></div>
            <p class='no-result'>No results found <i class='fa fa-spinner fa-pulse'></i></p>
        


        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>Menu</li>
                        <li>Tags</li>
                        
                        <li>Friends</li>
                        
                        
                        <li>About Me</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/">主页</a></li>
                        
                            <li><a href="/tags/">分类</a></li>
                        
                            <li><a href="/archives/">归档</a></li>
                        
                            <li><a href="/gallery/">相册</a></li>
                        
                            <li><a href="/about/">关于我</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" href="mailto:ma-mark@outlook.com" title="Email"></a>
                            
                                <a class="fa 新浪微博" href="http://weibo.com/mark900" title="新浪微博"></a>
                            
                                <a class="fa GitHub" href="https://github.com/markma" title="GitHub"></a>
                            
                                <a class="fa 知乎" href="https://www.zhihu.com/people/mark900" title="知乎"></a>
                            
                                <a class="fa Coding" href="https://coding.net/u/maxiaohang" title="Coding"></a>
                            
                                <a class="fa 网易云音乐" href="http://music.163.com/#/user/home?id=115229883" title="网易云音乐"></a>
                            
                                <a class="fa QQ" href="http://wpa.qq.com/msgrd?v=3&uin=954373276&site=qq&menu=yes" title="QQ"></a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Cpp/">Cpp</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hexo/">Hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Journal/">Journal</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Matlab/">Matlab</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/OpenLibrary/">OpenLibrary</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Python/">Python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Qt/">Qt</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Robot/">Robot</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Wiki/">Wiki</a></li></ul>
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a class="main-nav-link switch-friends-link" href="http://moxfive.xyz/">MOxFIVE</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">因为爱好，做着自己本不该做的事。为爱而活，不受羁绊！</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="回到主页">Mark</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                <img src="/img/avatar.png" class="animated zoomIn">
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="回到主页">Mark</a></h1>
            </hgroup>
            
            <p class="header-subtitle">To do to make progress</p>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/">主页</a></li>
                
                    <li><a href="/tags/">分类</a></li>
                
                    <li><a href="/archives/">归档</a></li>
                
                    <li><a href="/gallery/">相册</a></li>
                
                    <li><a href="/about/">关于我</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" target="_blank" href="mailto:ma-mark@outlook.com" title="Email"></a>
                            
                                <a class="fa 新浪微博" target="_blank" href="http://weibo.com/mark900" title="新浪微博"></a>
                            
                                <a class="fa GitHub" target="_blank" href="https://github.com/markma" title="GitHub"></a>
                            
                                <a class="fa 知乎" target="_blank" href="https://www.zhihu.com/people/mark900" title="知乎"></a>
                            
                                <a class="fa Coding" target="_blank" href="https://coding.net/u/maxiaohang" title="Coding"></a>
                            
                                <a class="fa 网易云音乐" target="_blank" href="http://music.163.com/#/user/home?id=115229883" title="网易云音乐"></a>
                            
                                <a class="fa QQ" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=954373276&site=qq&menu=yes" title="QQ"></a>
                            
                        </ul>
            </nav>
        </header>                
    </div>
    <link class="menu-list" tags="Tags" friends="Friends" about="About Me"/>
</nav>
      <div class="body-wrap"><article id="post-posts/Hexo/HEXO-Github-快速搭建属于自己的博客" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/" class="article-date">
      <time datetime="2016-08-07T07:05:11.000Z" itemprop="datePublished">2016-08-07</time>
</a>


    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      HEXO+Github Create your Blog
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
    <div class="article-category tagcloud">
    <a class="article-category-link" href="/categories/Hexo/">Hexo</a>
    </div>


        
    <div class="article-tag tagcloud">
        <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo/">Hexo</a></li></ul>
    </div>

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
          
        <blockquote>
<p>转自<a href="http://www.jianshu.com/p/465830080ea9" target="_blank" rel="external">《HEXO+Github,搭建属于自己的博客》</a><br><a id="more"></a></p>
</blockquote>
<h2 id="HEXO-Github-搭建属于自己的博客"><a href="#HEXO-Github-搭建属于自己的博客" class="headerlink" title="HEXO+Github,搭建属于自己的博客"></a>HEXO+Github,搭建属于自己的博客</h2><p>hexo是一款基于Node.js的静态博客框架,hexo github链接,这篇教程是针对与Mac的，参考链接，由于原文讲到的hexo是以前的老版本，所以现在的版本配置的时候会有些改动。</p>
<p>之前是想着写博客，一方面是给自己做笔记，可以提升自己的写作、总结能力，一个技术点我们会使用，并不难，但是要做到让让别人也能听懂我们讲得，还是需要一定的技巧和经验的。很多类似于CSDN、博客园也都可以写文章，但是页面的样式我，不是太喜欢，简书还算好点得。最近看到一些大神们的博客,貌似都是用hexo写得,我也依葫芦画瓢的搭建了一个。不罗嗦了，直接上搭建步骤。</p>
<h3 id="配置环境"><a href="#配置环境" class="headerlink" title="配置环境"></a>配置环境</h3><p>安装Node（必须）</p>
<p>作用：用来生成静态页面的</p>
<p>到Node.js官网下载相应平台的最新版本，一路安装即可。</p>
<p>安装Git（必须）</p>
<p>作用：把本地的hexo内容提交到github上去.</p>
<p>安装Xcode就自带有Git，我就不多说了。</p>
<p>申请GitHub（必须）</p>
<p>作用：是用来做博客的远程创库、域名、服务器之类的，怎么与本地hexo建立连接等下讲。</p>
<p>github账号我也不再啰嗦了,没有的话直接申请就行了，跟一般的注册账号差不多，SSH Keys，看你自己了，可以不配制，不配置的话以后每次对自己的博客有改动提交的时候就要手动输入账号密码，配置了就不需要了，怎么配置我就不多说了，网上有很多教程。</p>
<p>正式安装Hexo<br>Node和Git都安装好后,首先创建一个文件夹,如blog,用户存放hexo的配置文件,然后进入blog里安装Hexo。</p>
<p>执行如下命令安装Hexo：</p>
<pre><code>sudo npm install -g hexo
</code></pre><p>初始化然后，执行init命令初始化hexo,命令：</p>
<pre><code>hexo init
</code></pre><p>好啦，至此，全部安装工作已经完成！blog就是你的博客根目录，所有的操作都在里面进行。</p>
<p>生成静态页面</p>
<pre><code>hexo generate（hexo g也可以）
</code></pre><p>本地启动</p>
<p>启动本地服务，进行文章预览调试，命令：</p>
<pre><code>hexo server
</code></pre><p>浏览器输入<a href="http://localhost:4000" target="_blank" rel="external">http://localhost:4000</a></p>
<h3 id="配置Github"><a href="#配置Github" class="headerlink" title="配置Github"></a>配置Github</h3><p>建立Repository</p>
<p>建立与你用户名对应的仓库，仓库名必须为【your_user_name.github.io】，固定写法</p>
<p>然后建立关联，我的blog在本地/Users/leopard/blog，blog是我之前建的东西也全在这里面，有：</p>
<hr>
<pre><code>_config.yml    node_modules    public      source

db.json        package.json    scaffolds  themes
</code></pre><hr>
<p>现在我们需要_config.yml文件，来建立关联，命令：</p>
<pre><code>vim _config.yml
</code></pre><p>翻到最下面，改成我这样子的</p>
<pre><code>deploy:

     type: git

     repo: https://github.com/leopardpan/leopardpan.github.io.git

     branch: master
</code></pre><p>然后执行命令：</p>
<pre><code>npm install hexo-deployer-git --save
</code></pre><p>网上会有很多说法，有的type是github, 还有repository最后面的后缀也不一样，是github.com.git，我也踩了很多坑，我现在的版本是hexo: 3.1.1，执行命令hexo -vsersion就出来了,貌似3.0后全部改成我上面这种格式了。</p>
<p>忘了说了，我没用SSH Keys如果你用了SSH Keys的话直接在github里复制SSH的就行了，总共就两种协议，相信你懂的。</p>
<p>然后，执行配置命令：</p>
<pre><code>hexo deploy
</code></pre><p>然后再浏览器中输入<a href="https://username.github.io/" target="_blank" rel="external">https://username.github.io/</a>    就行了，我的github的账户叫markma,把这个改成你github的账户名就行了</p>
<h3 id="部署步骤"><a href="#部署步骤" class="headerlink" title="部署步骤"></a>部署步骤</h3><p>每次部署的步骤，可按以下三步来进行。</p>
<pre><code>hexo clean

hexo generate

hexo deploy
</code></pre><h3 id="一些常用命令："><a href="#一些常用命令：" class="headerlink" title="一些常用命令："></a>一些常用命令：</h3><pre><code>hexo new&quot;postName&quot; #新建文章

hexo new page&quot;pageName&quot; #新建页面

hexo generate #生成静态页面至public目录

hexo server #开启预览访问端口（默认端口4000，&apos;ctrl + c&apos;关闭server）

hexo deploy #将.deploy目录部署到GitHub

hexo help # 查看帮助

hexo version #查看Hexo的版本
</code></pre><h3 id="报错总结"><a href="#报错总结" class="headerlink" title="报错总结"></a>报错总结</h3><h4 id="ERROR-Deployer-not-found-git-或者-ERROR-Deployer-not-found-github"><a href="#ERROR-Deployer-not-found-git-或者-ERROR-Deployer-not-found-github" class="headerlink" title="ERROR Deployer not found: git 或者 ERROR Deployer not found: github"></a>ERROR Deployer not found: git 或者 ERROR Deployer not found: github</h4><p>解决方法： <code>npm install hexo-deployer-git --save</code></p>
<h4 id="ERROR-Process-failed-layout-DS-Store-那么进入主题里面layout和-partial目录下，使用删除命令："><a href="#ERROR-Process-failed-layout-DS-Store-那么进入主题里面layout和-partial目录下，使用删除命令：" class="headerlink" title="ERROR Process failed: layout/.DS_Store , 那么进入主题里面layout和_partial目录下，使用删除命令："></a>ERROR Process failed: layout/.DS_Store , 那么进入主题里面layout和_partial目录下，使用删除命令：</h4><pre><code>rm-rf.DS_Store
</code></pre><h4 id="ERROR-Plugin-load-failed-hexo-server"><a href="#ERROR-Plugin-load-failed-hexo-server" class="headerlink" title="ERROR Plugin load failed: hexo-server"></a>ERROR Plugin load failed: hexo-server</h4><p>原因：</p>
<p>Besides,utilities are separated into a standalone module.hexo.util is not reachable anymore.</p>
<p>解决方法，执行命令：</p>
<pre><code>sudo npm install hexo-server
</code></pre><h4 id="执行命令hexo-server，提示：Usage-hexo-…"><a href="#执行命令hexo-server，提示：Usage-hexo-…" class="headerlink" title="执行命令hexo server，提示：Usage: hexo …."></a>执行命令hexo server，提示：Usage: hexo ….</h4><p>原因：</p>
<p>我认为是没有生成本地服务</p>
<p>解决方法，执行命令：</p>
<pre><code>npm install hexo-server --save
</code></pre><h4 id="提示：hexo-server-0-1-2-node-modules-hexo-server"><a href="#提示：hexo-server-0-1-2-node-modules-hexo-server" class="headerlink" title="提示：hexo-server@0.1.2 node_modules/hexo-server"></a>提示：hexo-server@0.1.2 node_modules/hexo-server</h4><p>….</p>
<p>这个时候再执行：</p>
<p>hexo-server</p>
<p>得到:</p>
<pre><code>INFOHexo is running at http://0.0.0.0:4000/.PressCtrl+C to stop.
</code></pre><p>表示成功了</p>
<p>这个时候再点击 <a href="http://0.0.0.0:4000" target="_blank" rel="external">http://0.0.0.0:4000</a>    ，正常情况下应该是最原始的画面，但是我看到的是：</p>
<h4 id="白板和Cannot-GET-几个字"><a href="#白板和Cannot-GET-几个字" class="headerlink" title="白板和Cannot GET / 几个字"></a>白板和Cannot GET / 几个字</h4><p>原因：</p>
<p>由于2.6以后就更新了，我们需要手动配置些东西，我们需要输入下面三行命令：</p>
<pre><code>npm install hexo-renderer-ejs --save

npm install hexo-renderer-stylus --save

npm install hexo-renderer-marked --save
</code></pre><p>这个时候再重新生成静态文件，命令：</p>
<pre><code>hexo generate（或hexo g）
</code></pre><p>启动本地服务器：</p>
<pre><code>hexo server（或hexo s）
</code></pre><p>再，点击网址<a href="http://0.0.0.0:4000" target="_blank" rel="external">http://0.0.0.0:4000</a>    OK终于可以看到属于你自己的blog啦，😄，虽然很简陋，但好歹有了一个属于自己的小窝了。参考链接，本地已经简单的设置好了，但是现在域名和服务器都是基于自己的电脑，接下来需要跟github进行关联。</p>
<h3 id="主题推荐"><a href="#主题推荐" class="headerlink" title="主题推荐"></a>主题推荐</h3><p>这里有大量的主题列表使用方法里面</p>
<p>都有详细的介绍，我就不多说了。</p>
<p>我这里有几款个人认为不错的主题，免去你们，一个一个的选了，欢迎吐槽我的审美，😄</p>
<p><a href="https://github.com/someus/huno" target="_blank" rel="external">huno</a>：是为Hexo编写的一个响应式的主题，该主题基于Uno。</p>
<p><a href="https://github.com/stiekel/hexo-theme-random" target="_blank" rel="external">random</a>：A hexo theme with random fullscreen background image</p>
<p><a href="https://github.com/markma/hexo-themes-cover" target="_blank" rel="external">Cover</a>- A chic theme with facebook-like cover photo</p>
<p><a href="https://github.com/henryhuang/oishi" target="_blank" rel="external">Oishi</a>- A white theme based on Landscape plus and Writing.</p>
<p><a href="https://github.com/litten/hexo-theme-yilia" target="_blank" rel="external">Yilia</a>- Responsive and simple style 优雅简洁响应式主题，我用得就是这个。</p>
<h4 id="修改头像"><a href="#修改头像" class="headerlink" title="修改头像"></a>修改头像</h4><p>我当前的路径/Users/leopard/blog/themes/yilia，ls 你可以看到</p>
<hr>
<p>Gruntfile.js    _config.yml     package.json</p>
<p>README.md        layout              source</p>
<hr>
<p>vim _config.yml 进去，找到 #你的头像url avatar: 后接一个URL就行了，头像就修改成功了</p>
<h4 id="附送随机设置背景网站unsplash"><a href="#附送随机设置背景网站unsplash" class="headerlink" title="附送随机设置背景网站unsplash"></a>附送随机设置背景网站<a href="https://source.unsplash.com/" target="_blank" rel="external">unsplash</a></h4><p>效果如下图：<img src="https://source.unsplash.com/random" alt="此图随机生成"></p>

      
    </div>
    
  </div>
  
    
    <div class="copyright">
        <p><span>Title:</span><a href="/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/">HEXO+Github Create your Blog</a></p>
        <p><span>Author:</span><a href="/" title="Back to Homepage">Mark</a></p>
        <p><span>Created:</span>2016-08-07, 15:05:11</p>
        <p><span>Updated:</span>2016-08-17, 09:48:59</p>
        <p>
            <span>Full URL:</span><a class="post-url" href="/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/" title="HEXO+Github Create your Blog">http://markma.tk/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/</a>
            <span class="copy-path" data-clipboard-text="From http://markma.tk/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/　　By Mark" title="Copy Article&#39;s Link &amp; Author"><i class="fa fa-clipboard"></i></span>
            <script> var clipboard = new Clipboard('.copy-path'); </script>
        </p>
        <p>
            <span>License:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" title="CC BY-NC-SA 4.0 International" target = "_blank">"CC BY-NC-SA 4.0"</a> Keep Link &amp; Author if Distribute.
        </p>
    </div>



    <nav id="article-nav">
        
            <div id="article-nav-newer" class="article-nav-title">
                <a href="/posts/QtStudy/Qt中界面类名的修改/">
                    Qt ui界面调用
                </a>
            </div>
        
        
            <div id="article-nav-older" class="article-nav-title">
                <a href="/posts/Journal/hello-world/">
                    Hello World
                </a>
            </div>
        
    </nav>

  
</article>

    <div id="toc" class="toc-article">
        <strong class="toc-title">Contents</strong>
        
            <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#HEXO-Github-搭建属于自己的博客"><span class="toc-number">1.</span> <span class="toc-text">HEXO+Github,搭建属于自己的博客</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#配置环境"><span class="toc-number">1.1.</span> <span class="toc-text">配置环境</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#配置Github"><span class="toc-number">1.2.</span> <span class="toc-text">配置Github</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#部署步骤"><span class="toc-number">1.3.</span> <span class="toc-text">部署步骤</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#一些常用命令："><span class="toc-number">1.4.</span> <span class="toc-text">一些常用命令：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#报错总结"><span class="toc-number">1.5.</span> <span class="toc-text">报错总结</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#ERROR-Deployer-not-found-git-或者-ERROR-Deployer-not-found-github"><span class="toc-number">1.5.1.</span> <span class="toc-text">ERROR Deployer not found: git 或者 ERROR Deployer not found: github</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#ERROR-Process-failed-layout-DS-Store-那么进入主题里面layout和-partial目录下，使用删除命令："><span class="toc-number">1.5.2.</span> <span class="toc-text">ERROR Process failed: layout/.DS_Store , 那么进入主题里面layout和_partial目录下，使用删除命令：</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#ERROR-Plugin-load-failed-hexo-server"><span class="toc-number">1.5.3.</span> <span class="toc-text">ERROR Plugin load failed: hexo-server</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#执行命令hexo-server，提示：Usage-hexo-…"><span class="toc-number">1.5.4.</span> <span class="toc-text">执行命令hexo server，提示：Usage: hexo ….</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#提示：hexo-server-0-1-2-node-modules-hexo-server"><span class="toc-number">1.5.5.</span> <span class="toc-text">提示：hexo-server@0.1.2 node_modules/hexo-server</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#白板和Cannot-GET-几个字"><span class="toc-number">1.5.6.</span> <span class="toc-text">白板和Cannot GET / 几个字</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#主题推荐"><span class="toc-number">1.6.</span> <span class="toc-text">主题推荐</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#修改头像"><span class="toc-number">1.6.1.</span> <span class="toc-text">修改头像</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#附送随机设置背景网站unsplash"><span class="toc-number">1.6.2.</span> <span class="toc-text">附送随机设置背景网站unsplash</span></a></li></ol></li></ol></li></ol>
        
    </div>
    <style>
        .left-col .switch-btn,
        .left-col .switch-area {
            display: none;
        }
        .toc-level-3 i,
        .toc-level-3 ol {
            display: none !important;
        }
    </style>

    <input type="button" id="tocButton" value="Hide"  title="Show or Hide Table of Contents">

    <script>
        yiliaConfig.toc = ["Hide", "Show", !!"false"];
    </script>



    
<div class="share">
    
        <div class="bdsharebuttonbox">
            <a href="#" class="fa fa-twitter bds_twi" data-cmd="twi" title="分享到推特"></a>
            <a href="#" class="fa fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
            <a href="#" class="fa fa-qq bds_sqq" data-cmd="sqq" title="分享给 QQ 好友"></a>
            <a href="#" class="fa fa-files-o bds_copy" data-cmd="copy" title="复制网址"></a>
            <a href="#" class="fa fa fa-envelope-o bds_mail" data-cmd="mail" title="通过邮件分享"></a>
            <a href="#" class="fa fa-weixin bds_weixin" data-cmd="weixin" title="生成文章二维码"></a>
            <a href="#" class="fa fa-share-alt bds_more" data-cmd="more"></i></a>
        </div>
        <script>
            window._bd_share_config={
                "common":{"bdSnsKey":{},"bdText":"HEXO+Github Create your Blog　| Mark's Blog　","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
        </script>
    

    
</div>







    
      <div class="duoshuo" id="comments">
    <div id="comment-box" ></div>
    <div class="ds-thread" id="ds-thread" data-thread-key="posts/Hexo/HEXO-Github-快速搭建属于自己的博客/" data-title="HEXO+Github Create your Blog" data-url="http://markma.tk/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/"></div>
    <script>
        var duoshuoQuery = {short_name:"markma"};
        var loadComment = function(){
            var d = document, s = d.createElement('script');
            s.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
            s.async = true; s.charset = 'UTF-8';
            (d.head || d.body).appendChild(s);
        }

        
    </script>
    
    <script> loadComment(); </script>

</div>
    




    <div class="scroll" id="post-nav-button">
        
            <a href="/posts/QtStudy/Qt中界面类名的修改/" title="Pre: Qt ui界面调用">
                <i class="fa fa-angle-left"></i>
            </a>
        

        <a title="Mini Archives"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>

        
            <a href="/posts/Journal/hello-world/" title="Next: Hello World">
                <i class="fa fa-angle-right"></i>
            </a>
        
    </div>

    <ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/posts/Matlab/matlab cpp混编/">matlab cpp混编</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/QtStudy/Cpp中回调函数与静态成员/">Cpp中回调函数与静态成员</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/QtStudy/Qt中pro文件写法/">Qt pro文件写法</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/OpenSource/Qt串口开发QextserialPort/">Qt串口开发QextserialPort</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/QtStudy/Qt常见错误汇总/">Qt 常见错误汇总</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/OpenSource/Qt绘图库QCustomplot/">Qt绘图库 QCustomPlot</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/OpenSource/cpp机器人库robot-library/">cpp机器人库robot-library</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/OpenSource/开源库大全/">开源库大全</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/Python/Python-入门学习（二）/">Python-入门学习（二）</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/Python/Python-入门学习（一）/">Python-入门学习（一）</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/QtStudy/Qt中界面类名的修改/">Qt ui界面调用</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/Hexo/HEXO-Github-快速搭建属于自己的博客/">HEXO+Github Create your Blog</a></li><li class="post-list-item"><a class="post-list-link" href="/posts/Journal/hello-world/">Hello World</a></li></ul>




    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                <i class="fa fa-copyright"></i> 
                2016-2017 Mark
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank" title="A fast, simple &amp; powerful blog framework">Hexo</a>  Theme <a href="https://github.com/MOxFIVE/hexo-theme-yelee" target="_blank" title="Another simple and elegant theme for Hexo  v3.5">Yelee</a> by MOxFIVE <i class="fa fa-heart animated infinite pulse"></i>
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" title="Site Visitors"><i class="fa fa-user" aria-hidden="true"></i><span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>| </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit"  title="Page Hits"><i class="fa fa-eye animated infinite pulse" aria-hidden="true"></i><span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>
    </div>
    
<script data-main="/js/main.js" src="//cdn.bootcss.com/require.js/2.2.0/require.min.js"></script>

    <script>
        $(document).ready(function() {
            var iPad = window.navigator.userAgent.indexOf('iPad');
            if (iPad > -1 || $(".left-col").css("display") === "none") {
                var bgColorList = ["#9db3f4", "#414141", "#e5a859", "#f5dfc6", "#c084a0", "#847e72", "#cd8390", "#996731"];
                var bgColor = Math.ceil(Math.random() * (bgColorList.length - 1));
                $("body").css({"background-color": bgColorList[bgColor], "background-size": "cover"});
            }
            else {
                var backgroundnum = 27;
                var backgroundimg = "url(/background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
                $("body").css({"background": backgroundimg, "background-attachment": "fixed", "background-size": "cover"});
            }
        })
    </script>





    <script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script src="//cdn.bootcss.com/mathjax/2.6.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


<div class="scroll" id="scroll">
    <a href="#" title="Back to Top"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments" onclick="load$hide();" title="Comments"><i class="fa fa-comments-o"></i></a>
    <a href="#footer" title="Go to Bottom"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    // Open in New Window
    
        var oOpenInNew = {
            
            
            
            
            
            
             archives: ".archive-article-title", 
             miniArchives: "a.post-list-link", 
            
             friends: "#js-friends a", 
             socail: ".social a" 
        }
        for (var x in oOpenInNew) {
            $(oOpenInNew[x]).attr("target", "_blank");
        }
    
</script>

    <script>
        var originTitle = document.title;
        var titleTime;
        document.addEventListener("visibilitychange", function() {
            if (document.hidden) {
                document.title = "(つェ⊂) 我藏好了哦~ " + originTitle;
                clearTimeout(titleTime);
            }
            else {
                document.title = "(*´∇｀*) 被你发现啦~ " + originTitle;
                titleTime = setTimeout(function() {
                    document.title = originTitle;
                }, 2000);
            }
        })
    </script>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
  </div>
</body>
</html>